home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / usr / lib / ubiquity / compat / apt-install < prev    next >
Text File  |  2008-10-29  |  784b  |  21 lines

  1. #! /bin/sh -e
  2. mkdir -p /var/lib/ubiquity
  3. for package; do
  4.     echo "$package" >> /var/lib/ubiquity/apt-installed
  5. done
  6. # TODO cjwatson 2006-09-04: queueing not implemented
  7. if [ -f /var/lib/ubiquity/apt-install-direct ]; then
  8.     installed="$(mktemp -t ubiquity.XXXXXX)"
  9.     trap "rm -f '$installed'" EXIT HUP INT QUIT TERM
  10.     chroot /target dpkg-query -W --showformat='${Package} ${Status}\n' | \
  11.         grep ' installed$' | cut -d' ' -f1 | sort > "$installed"
  12.     toinstall="$(echo "$@" | xargs -n1 | sort | join -v1 - "$installed")"
  13.     if [ "$toinstall" ]; then
  14.         # TODO: use chroot-setup
  15.         DEBIAN_FRONTEND=noninteractive DEBIAN_HAS_FRONTEND= \
  16.         DEBCONF_ADMIN_EMAIL= chroot /target apt-get --no-upgrade \
  17.             -o Acquire::gpgv::Options::=--ignore-time-conflict -y \
  18.             install $toinstall </dev/null
  19.     fi
  20. fi
  21.